<template>
    <div id="riskControl">
        <!--搜索框-->
        <div class="salesman-tree">
            <el-button type="primary" class="salesman-tree-save">保存</el-button>
            <el-tree :data="data3" :default-expand-all="true" show-checkbox node-key="id" :default-expanded-keys="[2, 3]" :default-checked-keys="[5]"></el-tree>
        </div>
        <div class="salesman-content">
            <div class="search-box">
                <el-form :inline="true" class="search-in">
                    <el-form-item label="角色名" class="search-item" prop="telephone">
                        <el-input placeholder="角色名" ></el-input>
                    </el-form-item>
                    <el-form-item label="角色标识" class="search-item" prop="name">
                        <el-input placeholder="角色标识" ></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" icon="fa-search">查询</el-button>
                        <el-button icon="fa-repeat">重置</el-button>
                    </el-form-item>
                </el-form>
            </div>

            <div class="table-box">
                <el-table :data="tableData" border>
                    <el-table-column property="id" align="center" label="序号"></el-table-column>
                    <el-table-column property="state" align="center" label="角色名"></el-table-column>
                    <el-table-column property="username" align="center" label="角色识别" width="100"></el-table-column>
                    <el-table-column property="borrower" align="center" label="备注"></el-table-column>
                    <el-table-column property="idcard" align="center" label="状态" width="180"></el-table-column>
                    <el-table-column property="telephone" align="center" label="操作" width="140"></el-table-column>
                </el-table>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "riskControl",
        data() {
            return {
                data3: [{
                    id: 1,
                    label: '借款管理平台',
                    children: [{
                        id: 21,
                        label: '借款管理',
                        children: [{
                            id: 31,
                            label: '贷款申请',
                            children: [{
                                id: 3141,
                                label: '新增'
                            },
                            {
                                id: 3142,
                                label: '修改'
                            },
                            {
                                id: 3143,
                                label: '删除'
                            }]
                        },
                        {
                            id: 32,
                            label: '面签列表',
                            children: [{
                                id: 3241,
                                label: '面签批复'
                            },
                            {
                                id: 3242,
                                label: '修改'
                            }]
                        },
                        {
                            id: 33,
                            label: '家访列表',
                            children: [{
                                id: 3341,
                                label: '家访确认'
                            }]
                        },
                        {
                            id: 34,
                            label: '财务审核',
                            children: [{
                                id: 3441,
                                label: '财务核算'
                            },
                            {
                                id: 3442,
                                label: '修改'
                            }]
                        },
                        {
                            id: 35,
                            label: '风控审核',
                            children: [{
                                id: 3541,
                                label: '确认'
                            }]
                        },
                        {
                            id: 36,
                            label: '协议上传',
                            children: [{
                                id: 3641,
                                label: '上传协议'
                            },
                            {
                                id: 3642,
                                label: '查看协议'
                            }]
                        },
                        {
                            id: 37,
                            label: '资产管理',
                            children: [{
                                id: 3741,
                                label: '匹配/发标'
                            },
                            {
                                id: 3742,
                                label: '发标审核'
                            },
                            {
                                id: 3743,
                                label: '满标审核'
                            },
                            {
                                id: 3744,
                                label: '暂停/截标'
                            },
                            {
                                id: 3745,
                                label: '确认放款'
                            },
                            {
                                id: 3746,
                                label: '还款/续借'
                            },
                            {
                                id: 3747,
                                label: '查看'
                            }]
                        }]
                    },
                    {
                        id: 12,
                        label: '会员管理',
                        children: [{
                            id: 121,
                            label: '会员列表',
                            children: [{
                                id: 1211,
                                label: '查看'
                            }]
                        }]
                    },
                    {
                        id: 13,
                        label: '标的管理',
                        children: [{
                            id: 131,
                            label: '审核'
                        },
                        {
                            id: 132,
                            label: '编辑'
                        },
                        {
                            id: 133,
                            label: '暂定/截标'
                        },
                        {
                            id: 134,
                            label: '查看'
                        }]
                    }]
                }],
                defaultProps: {
                    children: 'children',
                    label: 'label'
                },
                tableData: [
                    {
                        id: 1,
                        state: "待面签",
                        username: "UserName-1",
                        borrower: "张三",
                        idcard: "451012199911362576",
                        telephone: "130 6890 5634",
                        models: "奥迪A4",
                        explain: "2009年车",
                        quota: "10,000.00",
                        deadline: 6,
                        create: "2016.09.08 21:08:06",
                        clerk: "业务经理001"
                    }
                ],
                pageNum: 1
            };
        },
        methods: {
            onSubmit () {
            }
        }
    };
</script>

<style lang="scss">
    #riskControl{
        padding: 20px;
        overflow: hidden;
        .salesman-tree{
            position: relative;
            float: left;
            width: 300px;
            min-height: 80px;
            border: 1px solid #eee;
            overflow: hidden;
            .el-tree{
                border: none!important;
            }
            .salesman-tree-save{
                position: absolute;
                top: 20px;
                right: 20px;
            }
        }
        .salesman-content{
            height: 500px;
            margin-left: 320px;
            overflow: hidden;
            .search-box{
                border: 1px solid #eee;
                padding:22px 0 0 20px;
                box-sizing: border-box;
                .search-in{
                    .search-item{
                        margin-right: 30px;
                    }
                }
            }
            .table-box{
                border: 1px solid #eee;
                margin: 20px 0;
                .add-btn{
                    margin: 20px;
                    .el-icon-plus{
                        font-size:12px;
                        vertical-align: 1.5px;
                    }
                    a{
                        color: #fff;
                        text-decoration: none;
                    }
                }
            }
            .el-table .cell, .el-table th>div{
                padding:5px;
                white-space: nowrap;
            }
        }
    }
</style>
